<html>
<?php 
    session_start();
    include_once 'header.php'; 
  //  include_once 'image_manip.php';
    

?>
    <body>
        <div class="top_container" style="height:100px;width:100%;">
            <div class="title" style="height:80%;width:100%;background-color:#00BFFF;">
                <h1><a href="./index.php">e-agora.gr</a></h1>
            </div>

            <div class="search" style="height:20%;width:100%;background-color: #696969;">
            <?php // include search_product.php;
            echo "Πεδίο αναζήτησης";//TODO Remove this when done
            ?>
            
            </div>
        </div>
        
        <div class="categories" style="width:150px;height:100%;float:left;background-color:#FF8C00;">
        <?php //include categories.php;
        echo "Λίστα με κατηγορίες";//TODO Remove this when done?>
        </div>

        <div class="user" style="width:150px;height:100%; float:right;background-color:#FF8C00;">
            <?php
            if(isset($_SESSION['loggedin']) && $_SESSION['loggedin']===TRUE) {
                include 'profile_mini.php';
                include 'logout.php';
				echo "<a href='members.php'>create users</a>";
				echo "<br>";
			echo "<a href='index.php?action=create_product_3'>create product</a>";
			echo "<br>";
			
			echo "<a href='yourstore'>Your Store</a>";
			
			
            }
			
            else{
                include 'login.php';
                echo "<a href='./index.php?action=sighnup'>Εγγραφή</a>";
            }

            ?>
        </div>
        <div class="site" style="background-color: #cccccc ;height: 100%; margin:auto;">
                Κενρικό site.
                <?php
				if(isset($_SESSION['loggedin']) && $_SESSION['loggedin']===TRUE) {
				include 'yourstore.php';
				$result_ids=show_yourstore($username);
				show_yourstore2($result_ids);
				}
				
                    if(isset($_GET['action'])){ 
                        $site=$_GET['action'];
                        $site.='.php';
                        include "./$site";
						
                    }
                    //else 
                       // include 'main.php';
                 ?>
        </div>



    </body>
</html>
